const api = require('../request/index')

module.exports = {
    //注册接口
    registerAccount: function(data) {
        return api.request(
            '/wechart/register',
            'post',
            {},
            data
        )
    },
      // 设备类别列表
  equipTypeList:function(query){
    return api.request(
        '/wechart/device/typeList',
        'get',
        query
    )
  },
  // 获取设备列表
  equipList:function(query){
    return api.request(
        '/wechart/device/deviceList',
        'get',
        query
    )
  },
  equipQueryId:function(deviceId){
    return api.request(
      `/wechart/device/${deviceId}`,
      'get'
    )
  },
  borrowApplication:function(data){
    return api.request(
      `/wechart/device`,
      'put',
      {},
      data
    )
  },
// 获取借用记录
  borrowList:function(query){
    return api.request(
        '/wechart/device/borrowList',
        'get',
        query
    )
  },
  // 归还设备
  returnEquip:function(data){
    return api.request(
        '/wechart/device/returnDevice',
        'post',
        {},
        data
    )
  }
}